package com.framework.admin.enums;

public enum MenuTypeEnum {
    FOLDER("0", "文件夹"),
    MENU("1", "菜单"),
    BUTTON("2", "按钮");

    private String value;

    private String desc;

    MenuTypeEnum (String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static MenuTypeEnum parse(String type) {
        for (MenuTypeEnum it : MenuTypeEnum.values()) {
            if (it.getValue().equals(type)) {
                return it;
            }
        }
        return MenuTypeEnum.MENU;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
